package package1;
/*
 *  user:38917
 *  date:2025/5/1
 *  time:17:27
 */

public class MyDate {
    private String Year1;
    private String Month1;
    private String Day1;
    /*//
    public MyDate() {
        this("2025","5","1");
    }
    public MyDate(String year, String month, String day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }*/
    //
    public String getYear() {
        return Year1;
    }
    public void setYear(String year) {
        this.Year1 = year;
    }
    public String getMonth() {
        return Month1;
    }
    public void setMonth(String month) {
        this.Month1 = month;
    }
    public String getDay() {
        return Day1;
    }
    public void setDay(String day) {
        this.Day1 = day;
    }
}
class Test{
    public static void main(String[] args) {
        MyDate myDate = new MyDate();
        //使用get方法获取private修饰的成员变量
        System.out.println(myDate.getYear());
        System.out.println(myDate.getMonth());
        System.out.println(myDate.getDay());
        //使用set方法修改private修饰的成员变量
        myDate.setYear("2025");
        myDate.setMonth("5");
        myDate.setDay("1");
        //使用get方法获取private修饰的成员变量
        System.out.println(myDate.getYear());
        System.out.println(myDate.getMonth());
        System.out.println(myDate.getDay());
    }
}


